import http from '../../utils/request/request'

// 获取基地信息
export function getBaseInfo() {
    return http({
        url: `/leader/farming/farmingBase`,
        method: 'get',
    })
}

// 根据基地编号获取摄像头
export function getMonitorByNumber(data) {
    return http({
        url: `/leader/monitor/baseId/${data.baseId}/${data.page}/${data.size}`,
        method: 'post',
    })
}

// 修改摄像头信息
export function updateMonitor(data) {
    return http({
        url: `/leader/monitor/update`,
        method: 'post',
        data
    })
}

// 更新摄像头使用状态
export function upstateMonitorStatus(data) {
    return http({
        url: `/leader/monitor/modify/${data.id}/${data.status}`,
        method: 'get'
    })
}

// 删除摄像头
export function deleteMonitor(data) {
    return http({
        url: `/leader/monitor/${data}`,
        method: 'delete'
    })
}

// 分页获取摄像头
export function getMonitor(data) {
    return http({
        url: `/leader/monitor/${data.page}/${data.size}`,
        method: 'get'
    })
}

// 增加摄像头
export function addMonitor(data) {
    return http({
        url: `/leader/monitor/add`,
        method: 'post',
        data
    })
}
